package com.effectiv.gooruda.rest.domain;


import java.util.List;

import javax.validation.constraints.NotNull;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import org.hibernate.validator.constraints.Email;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;

@ToString
public class User extends PesistentBase{

	
	private static final long serialVersionUID = 1L;
	
	@Indexed(unique = true)
	@Email
	@Getter
	@Setter
	private String email;
	
	@Indexed(unique = true)
	@NotNull
	@Getter
	@Setter
	private String userName;
	
	
	@NotNull
	@Getter
	@Setter
	private String password;
	
	
	@Getter
	@Setter
	@DBRef
	private List<Role> roles;
	
	
	@Getter
	@Setter
	private boolean locked;
	
	
	@Getter
	@Setter
	private Address presentAddress;
	
	
	@Getter
	@Setter
	private Address permanentAddress;
	
	
	@Getter
	@Setter
	private Profile profile;
	
	@Getter
	@Setter
	private boolean deleted;
}
